package com.kingbook.services;

import com.kingbook.core.base.SupportService;
import com.kingbook.entity.Device;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author Bucky
 * @Date 2019-11-16 00:36:32
 * @Version 1.0
 */
@Slf4j
@Service
public class DeviceService extends SupportService {

    @PostConstruct
    private void init() {
        setNamespace("Device");
    }

    public Device queryDeviceBySign(String sign) {
        Map<String, Object> param = new HashMap<>(1);
        param.put("sign", sign);
        return findObject("query", param, Device.class);
    }

}
